#include <string>
#include <iostream>

#include "huffman.h"

using namespace std;

int main()
{
    Huffman h ("paralalepipedo");
    int* t = h.frequency();
    cout << "Frequency:" << endl;
    for(int i = 0; i < 256; i++){
        if(t[i] != 0){
            cout << (char)i << " - " << t[i] << endl;
        }
    }
    BinaryHeap heap = h.buildBinaryHeap();
    cout << "Binary Heap:" << endl;
    while(heap.size() != 0){
        ItemBH i = heap.remove();
        cout << i.data->data << " - " << i.id << endl;
    }
    return 0;
}

